package com.javakc.pms.dispord.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;

import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * program:
 *
 * @author: zhangchenghui
 * @date: 2021/9/14
 * apiNote
 */
@Getter
@Setter
@Entity
@Table(name = "pms_disp_ord")
@EntityListeners(AuditingEntityListener.class)
public class DispOrd {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(name = "order_name")
    private String orderName;

    @Column(name = "spec_type")
    private int specType;

    @Column(name = "priority")
    private int priority;

    @Column(name = "order_desc")
    private String orderDesc;

    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "gmt_create",updatable = false)
    private Date gmtCreate;

    @LastModifiedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "gmt_modified", insertable = false)
    private Date gmtModified;

}
